<link rel="stylesheet" href="./static/bootstrap/css/bootstrap.min.css">

<nav class="navbar navbar-inverse" style="border-radius: 0">
	<div class="container">
		<a class="navbar-brand" >学生管理系统</a>
		<ul class="nav navbar-nav" style="float: right;">
            <li class="active" >
                <a href="?">首页</a>
            </li>
            <!--判断用户是否已经登录过了-->
            <!--如果登录过了则显示后台的跳转链接以及跳转到用户修改密码的链接-->
            <!--显示退出的链接-->
            <?php if(isset($_SESSION["user"])):?>
                <li>
                    <a href="javascript:localStorage['list-group-item']=0;location.href='<?php echo u('admin/entry/index');?>'">后台</a>
                </li>
                <li>
                    <a href="javascript:localStorage['list-group-item']=3;location.href='<?php echo u('admin/user/changepassword');?>'">
                        <span style="color: red"><?php echo $_SESSION["user"]["username"];?></span>
                    </a>
                <li>
                    <a href="<?php echo u('admin/user/logout');?>">退出</a>
                </li>
                <!--否则如果还没有登录的话则显示登录的链接-->
            <?php else:?>
                <li>
                    <a href="<?php echo u('admin/user/login');?>">登录</a>
                </li>
            <?php endif;?>
		</ul>

	</div>
</nav>